<?php
session_start();
if (isset($_REQUEST['menuid'])) {
	if ($_REQUEST['actions']=='show') {
		$menu_array = $_SESSION['menuid'];
		if (!$menu_array) {
			$menu_array = array();
		}
		$temp_index = array_search( $_REQUEST['menuid'],$menu_array);
		if (!$temp_index) {
			array_push($menu_array, $_REQUEST['menuid']);
		}
		$_SESSION['menuid'] = $menu_array;
	}else{
		$menu_array = $_SESSION['menuid'] ;
		$temp_index = array_search( $_REQUEST['menuid'],$menu_array);
		array_splice($menu_array,$temp_index,1);
		$_SESSION['menuid'] = $menu_array;
	}
	
}
?>